#ifndef _DATA_STRUCT_H
#define _DATA_STRUCT_H
#include "common.h"
#include <sys/socket.h>
#include <arpa/inet.h>
#include <time.h>
#include <sys/time.h>
#include <pthread.h>
#define EXIT -1
#define INFO 1
#define DEBUG 2
#define WARNING 3
#define ERR 4

#define REGISTER 5
#define GETUSER 6
#define KEEPLIVE 7
#define DATA 8
#define GETSTAT 9
typedef struct node
{
	char user_name[20];
	int fd;
	time_t time;
	struct node *next;
}User;

typedef struct link_head
{
	User *head;
}Link_head;

typedef struct message
{
	int type;
	char fromuser[20];
	char touser[20];
	time_t time;
	char data[1024];
}Message;
#endif